package com.jmex.physics.impl.bullet;

public class BulletNativeInvoker {

	static
	{
		System.loadLibrary("BulletJNI");
	}
	
	public static native void step(Object calle, float time);
	public static native void createPhysicsWorld(Object caller);
	public static native long rebuildRigidBody(Object caller, 
			float transX, float transY, float transZ, 
			float rotX, float rotY, float rotZ, float rotW,
			float scaleX, float scaleY, float scaleZ,
			float comX, float comY, float comZ,
			float linVX, float linVY, float linVZ,
			float angVX, float angVY, float angVZ,
			float mass);
	public static native long buildJoint(Object caller, int type,
			float rotAX, float rotAY, float rotAZ, float rotAW,
			float transAX, float transAY, float transAZ,
			float rotBX, float rotBY, float rotBZ, float rotBW,
			float transBX, float transBY, float transBZ,
			long rbHandleA, long rbHandleB, boolean willCollideWithSelf);
	public static native long updateJointAxisInfo(long jointHandle, int axisIndex,
			float availableAccel, float desiredVelocity,
			float posMin, float posMax);
	public static native void pushRigidBodyInfo(long[] rbHandle,
			float[] transX,float[] transY,float[] transZ,
			float[] rotX,float[] rotY,float[] rotZ,float[] rotw,
			float[] linVX,float[] linVY,float[] linVZ,
			float[] angVX,float[] angVY,float[] angVZ);
	public static native void applyForces(long[] rbHandle,
			float[] forceX,float[] forceY,float[] forceZ,
			float[] posX,float[] posY,float[] posZ,
			float[] torqueX,float[] torqueY,float[] torqueZ);
}
